package websocket

import (
	"github.com/garyburd/redigo/redis"
	"global/function"
	"server/bitkop/app/service"
)

type TrustItem struct {
	Number string `json:"n"`
	Price  string `json:"p"`
}

func trusts(conn redis.Conn, pair string, floatPrice int) interface{} {
	return map[string]interface{}{
		"buy":  service.GetTrustList(conn, "buy", function.GetDepthKey(pair, "buy", 8), floatPrice),
		"sale": service.GetTrustList(conn, "sale", function.GetDepthKey(pair, "sale", 8), floatPrice),
	}
}
